const express = require('express');
const router = express.Router();

// 导入各个路由模块
const userRoutes = require('./userRoutes');
const noteRoutes = require('./noteRoutes');
const videoRoutes = require('./videoRoutes');
const commentRoutes = require('./commentRoutes');
const categoryRoutes = require('./categoryRoutes');
const membershipOrderRoutes = require('./membershipOrderRoutes');
const draftRoutes = require('./draftRoutes');

// 注册路由模块
router.use('/users', userRoutes);
router.use('/notes', noteRoutes);
router.use('/videos', videoRoutes);
router.use('/comments', commentRoutes);
router.use('/categories', categoryRoutes);
router.use('/orders', membershipOrderRoutes);
router.use('/drafts', draftRoutes);

// 健康检查路由
router.get('/health', (req, res) => {
  res.status(200).json({ status: 'ok', message: '服务正常运行' });
});

module.exports = router;